<template>
  <customer-index v-if="type == 'customerIndex'" @menu-select="selectType" :typeKey="typeKey"></customer-index>
  <list-seas-index v-else @menu-select="selectType"></list-seas-index>
</template>

<script>
import CustomerIndex from './ListCustomer'
import ListSeasIndex from './ListSeasIndex'
import { mapGetters } from 'vuex'
export default {
  name: 'CustomerAllIndex',
  components: {
    CustomerIndex,
    ListSeasIndex,
  },
  props: {},
  data() {
    return {
      type: 'customerIndex',
      typeKey: ['customer'],
      componentName: '',
    }
  },
  computed: {},
  watch: {},
  mounted() {},

  beforeDestroy() {},
  methods: {
    selectType(e) {
      this.typeKey = e.keyPath
      if (e.key == 'customer') {
        this.type = 'customerIndex'
      } else {
        this.type = 'listSeasIndex'
      }
    },
  },
}
</script>

<style lang="scss" scoped>
</style>
